exp2
Type
function
Summary
Returns the binary exponential of a number.
Syntax
the exp2 of <number>
exp2(<number>)
Description
Use the exp2 function to obtain a power of 2.
The expression exp2(number) is equal to 2^number.
If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.
Parameters
Name | Type | Description |
---|---|---|
number | A real number, or an expression that evaluates to a number. |
Examples
exp2(8) -- returns 256
exp2(the screenDepth) -- returns number of colors available
Related
function: exp
glossary: binary, return, math operation
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile